<div id="footer" class="footer">
    <hook name="footer_start"/>
    <div style="height: 50px;width:1280px;bottom: 0;position: absolute;left: 50%;transform:translateX(-50%)">
        <div class="collapse navbar-collapse active" id="bs-example-navbar-collapse-1">
            <ul id="main-menu" class="navbar-nav">
                <li>
                    <notempty name="site_info.site_icp">
                        <a href="http://www.miitbeian.gov.cn/" style="font-size: 12px"
                           target="_blank">{$site_info.site_icp}</a>
                    </notempty>
                </li>
                <navigation nav-id="" root="" id="main-navigation" class="nav navbar-nav navbar-nav-custom"
                            max-level="0">
                    <navigationMenu>
                        <if condition="$level gt 1">
                            <li class="menu-item menu-item-level-{$level} levelgt1">
                                <a href="{$menu.href|default=''}" target="{$menu.target|default=''}">
                                    {$menu.name|default=''}
                                </a>
                            </li>
                            <else/>
                            <li class="menu-item menu-item-level-{$level}">
                                <a href="{$menu.href|default=''}" target="{$menu.target|default=''}">
                                    {$menu.name|default=''}
                                </a>
                            </li>
                        </if>
                    </navigationMenu>
                    <navigationFolder root="li"
                                      class="dropdown dropdown-custom dropdown-custom-level-{$level}"
                                      dropdown="ul"
                                      dropdown-class="dropdown-menu dropdown-menu-level-{$level}">
                        <a href="#" class="dropdown-toggle dropdown-toggle-{$level}" data-toggle="dropdown">
                            {$menu.name|default=''}<span class="caret"></span>
                        </a>
                    </navigationFolder>
                </navigation>
            </ul>
            <ul class="footer-link">
                <Links id="vo">
                    <notempty name="$vo.code">
                        <img class="code-img" src="{:cmf_get_image_preview_url($vo.code)}">
                    </notempty>
                    <if condition="$vo.url!=1&&$vo.url!=2">
                        <li>
                            <a href="{$vo.url}" target="{$vo.target}">
                                <span>{$vo.name}</span>
                                <img style="height: 20px" src="{:cmf_get_image_preview_url($vo.image)}"/>
                            </a>
                        </li>
                    </if>
                    <if condition="$vo.url==1">
                        <li id="indexCode">
                            <span>{$vo.name}</span>
                            <img style="height: 20px" src="{:cmf_get_image_preview_url($vo.image)}"/>
                        </li>
                    </if>
                    <if condition="$vo.url==2">
                        <li id="wxCode">
                            <span>{$vo.name}</span>
                            <img style="height: 20px" src="{:cmf_get_image_preview_url($vo.image)}"/>
                        </li>
                    </if>
                </Links>
            </ul>
        </div>
    </div>
</div>
<div id="backtotop">
    <i class="fa fa-arrow-circle-up"></i>
</div>
<div class="code" id="code">
    <div id="qrcode"></div>
    <div class="yuyue" id="codeText">微信扫码预约</div>
</div>
<style>
    .code {
        position: fixed;
        right: 100px;
        bottom: 200px;
        z-index: 10000;
        height: 250px;
        width: 200px;
        border: solid #00a0e9 1px;
        padding: 15px;
        text-align: center;
        display: none;
    }

    canvas {
        width: 170px;
        border: solid #00a0e9 5px;
    }

    .yuyue {
        height: 50px;
        color: #fffFFF;
        font-size: 20px;
        line-height: 50px;
        padding: 0 20px;
        font-weight: bolder;
        text-shadow: 0 1px #00a0e9, 1px 0 #00a0e9, -1px 0 #00a0e9, 0 -1px #00a0e9;
    }
</style>
<script src="__TMPL__/public/assets/js/jquery.qrcode.min.js"></script>
<script>

    $("#indexCode").hover(getIndexCode,function(){
        $("#code").fadeOut()
    });
    $("#wxCode").hover(getWXCode,function(){
        $("#code").fadeOut()
    });
    function getIndexCode() {
        var text = window.yuyue;
        $('#qrcode').html("")
        $('#qrcode').qrcode({
            render: "canvas", //也可以替换为table
            foreground: "#00a0e9",
            background: "#FFF",
            text: text
        });
        $("#codeText").text("微信扫码预约")
        $("#code").fadeIn()
    }
    function getWXCode() {
        var t = "http://weixin.qq.com/r/CiiiuiDEm33krWTZ930Y"
        $('#qrcode').html("")
        $('#qrcode').qrcode({
            render: "canvas", //也可以替换为table
            foreground: "#00a0e9",
            background: "#FFF",
            text: t
        });
        $("#codeText").text("微信扫码关注")
        $("#code").fadeIn()
    }
</script>
